package com.castle.fortress.admin.member.mapper;

import com.castle.fortress.admin.member.dto.MemberDto;
import com.castle.fortress.admin.member.dto.MemberGroupMembersDto;
import com.castle.fortress.admin.member.entity.MemberEntity;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.member.entity.MemberGroupMembersEntity;
import java.util.Map;
import java.util.List;
/**
 * 会员分组及会员关联关系表Mapper 接口
 *
 * @author castle
 * @since 2023-02-13
 */
public interface MemberGroupMembersMapper extends BaseMapper<MemberGroupMembersEntity> {

	List<MemberGroupMembersEntity> queryList(@Param("map")Map<String, Long> pageMap, @Param("memberGroupMembersEntity") MemberGroupMembersEntity memberGroupMembersEntity);


    /**
     * 扩展信息列表
     * @param pageMap
     * @param dto
     * @return
     */
    List<MemberEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("memberDto") MemberDto dto);

    /**
     * 扩展信息记录总数
     * @param dto
     * @return
     */
    Long extendsCount( @Param("memberDto") MemberDto dto);

    List<Long> distinctMemberByGroup(@Param("id")Long groupId);

    List<Long> distinctGroupByMember(@Param("id")Long memberId);

    List<MemberGroupMembersEntity> listMemberGroupMembers(@Param("memberGroupMembersDto") MemberGroupMembersDto memberGroupMembersDto);
}
